package com.etone.smartAudit.dto.task;

import com.etone.smartAudit.dto.admin.SimpleAdminDTO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author: 蒋学伟
 * @create: 2020-06-30 10:43:04
 * @Description TaskDTO
 */
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Data
@ApiModel(value = "TaskDTO", description = "任务")
public class BaseTaskDTO implements Serializable {

    @ApiModelProperty("任务名称")
    @NotEmpty
    private String name;

    @ApiModelProperty("项目id")
    @NotNull
    private Integer itemId;

    @ApiModelProperty("项目名称")
    @NotEmpty
    private String itemName;

    @ApiModelProperty("联系人")
    private String contact;

    @ApiModelProperty("联系方式")
    private String contactTel;

    @ApiModelProperty("预计工时")
    private Double workTime;

    @ApiModelProperty("预计完成时间")
    private Date workEndTime;

    @ApiModelProperty("审核人id")
    private Integer nodeAdminId;

    @ApiModelProperty("审核人名称")
    private String nodeAdminName;

    @ApiModelProperty("项目任务对应的id")
    private Integer itemTypeId;

    @ApiModelProperty("执行人")
    private List<SimpleAdminDTO> execAdmins;

    @JsonIgnore
    private Integer parentId;
}
